/*
 * @Author: Y先森
 * @Date: 2023-05-10 15:51:14
 * @LastEditors: y && 250048395@qq.com
 * @LastEditTime: 2023-05-10 17:33:25
 * @FilePath: \y-website\src\pages\y-blog\api\index.js
 */
/*
 * @Author: Y先森
 * @Date: 2023-04-18 09:58:45
 * @LastEditors: y && 250048395@qq.com
 * @LastEditTime: 2023-05-09 10:54:22
 * @FilePath: \y-website\src\api\index.js
 */
// api 管理
import request from '../utils/request'
/**
 * 获取侧边栏菜单列表
 * @param {*} params
 * @returns
 */
export const getMenuList = (params) => {
  return request({
    url: '/menu/list',
    method: 'get',
    data: params,
    mock: true
  })
}

export const getDesiginList = (params) => {
  return request({
    url: '/desigin/list',
    method: 'post',
    data: params,
    mock: true
  })
}
/**
 * 获取分类列表 - 【作品展示】
 */
export const getCategory = (params) => {
  return request({
    url: '/category',
    method: 'get',
    data: params,
    mock: true
  })
}

/**
 * 获取分类列表 - 【技术分享】
 */
export const getCraftShareCategory = (params) => {
  return request({
    url: '/craftShare/category',
    method: 'get',
    data: params,
    mock: true
  })
}

/**
 * 获取分类列表 - 【灵感创作】
 */
export const getCreationCategory = (params) => {
  return request({
    url: '/creation/category',
    method: 'get',
    data: params,
    mock: true
  })
}


/**
 * 获取历史数据 - 【音乐】
 */
export const getHint = (params) => {
  return request({
    url: '/hint',
    method: 'get',
    data: params,
    mock: true
  })
}

/**
 * 获取推荐主题
 */
export const getThemes = () => {
  return request({
    url: '/themes',
    method: 'get',
    mock: true
  })
}

/**
 * 获取指定图片数据
 */
export const getPexelsFromId = (id) => {
  return request({
    url: `/pexels/${id}`,
    method: 'get',
    mock: true
  })
}
